package com.comdo.newup_loan.http;


import com.comdo.newup_loan.model.CarBrandBean;
import com.comdo.newup_loan.model.CarByCodeBean;
import com.comdo.newup_loan.model.CarCityItemBean;
import com.comdo.newup_loan.model.CarConfigsBean;
import com.comdo.newup_loan.model.CarModelBean;
import com.comdo.newup_loan.model.CarSeriesBean;
import com.comdo.newup_loan.model.CostBean;
import com.comdo.newup_loan.model.Department;
import com.comdo.newup_loan.model.FlowListBean;
import com.comdo.newup_loan.model.HomeDataBean;
import com.comdo.newup_loan.model.IndustryBean;
import com.comdo.newup_loan.model.LoginInfo;
import com.comdo.newup_loan.model.MemberBean;
import com.comdo.newup_loan.model.MessageBean;
import com.comdo.newup_loan.model.NativeBean;
import com.comdo.newup_loan.model.NewUpVersionBean;
import com.comdo.newup_loan.model.NoticeBean;
import com.comdo.newup_loan.model.NoticeDetailBean;
import com.comdo.newup_loan.model.PenaltyBean;
import com.comdo.newup_loan.model.PresentRecordBean;
import com.comdo.newup_loan.model.RePayDetailBean;
import com.comdo.newup_loan.model.RepayList;
import com.comdo.newup_loan.model.Result;
import com.comdo.newup_loan.model.ToPayOff;
import com.comdo.newup_loan.model.ToRepayBean;
import com.comdo.newup_loan.model.ToXuDaiApply;
import com.comdo.newup_loan.model.UpLoadBean;
import com.comdo.newup_loan.model.UpLoadCard;
import com.comdo.newup_loan.model.UserBaseInfo;
import com.comdo.newup_loan.model.UserInfoBean;
import com.comdo.newup_loan.model.WanLoanBean;

import java.util.List;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;

public interface ApiService {
    // public static final String PATHS = "http://test.newup.net.cn:8087/newup-user-int/";
 // public static final String PATHS =" http://192.168.1.36:8080/newup-user-int/";
    public static final String PATHS = "https://www.newup.net.cn/";
    // 首页轮播图
    @GET("user/app/b/index/getScrollPicture")
    Observable<Result<HomeDataBean>> loadHomePics();

    //登陆
    @POST("user/app/b/index/login")
    Observable<Result<LoginInfo>> login(@Body RequestBody body);

    //注册
    @POST("user/app/b/index/register")
    Observable<Result<LoginInfo>> register(@Body RequestBody body);

    //找回密码
    @POST("user/app/b/index/forgetPassword")
    Observable<Result<String>> forgetPassword(@Body RequestBody body);

    //获取验证码
    @POST("user/app/b/index/getValidCode")
    Observable<Result<String>> getcode(@Body RequestBody body);

    //获取公告列表
    @POST("app/b/user/borrower/borrowerNotice")
    Observable<Result<List<NoticeBean>>> getNoticeList(@Body RequestBody body);

    //获取公告详情
    @POST("app/b/user/borrower/getBorrowerNoticeDetails")
    Observable<Result<NoticeDetailBean>> getNoticeDetail(@Body RequestBody body);

    //获取用户信息
    @POST("user/app/b/info/getUserInfo")
    Observable<Result<UserInfoBean>> getUserInfo(@Body RequestBody body);

    //意见反馈
    @POST("app/b/user/borrower/feedBack")
    Observable<Result<String>> feedBack(@Body RequestBody body);

    //资金流水
    @POST("app/b/user/getTransactionList")
    Observable<Result<FlowListBean>> getTransactionList(@Body RequestBody body);
   //提现记录
   @POST("user/app/getAppTakeoutRecordList")
   Observable<Result<List<PresentRecordBean>>> getAppTakeoutRecordList(@Body RequestBody body);

    //系统消息
    @POST("app/b/user/borrower/systemMessage")
    Observable<Result<List<MessageBean>>> getMessage(@Body RequestBody body);

    // 获取所有分部列表
    @GET("user/app/b/branchOffice/getDepartments")
    Observable<Result<List<Department>>> getDepartments();

    //门店详情
    @POST("user/app/b/branchOffice/getDepartmentDetails")
    Observable<Result<MemberBean>> getDepartmentDetails(@Body RequestBody body);

    //获取最近的分公司信息接口
    @POST("user/app/b/branchOffice/nearestDepartment")
    Observable<Result<Department>> nearestDepartment(@Body RequestBody body);

    // 车辆额度查询--获取配置，省，颜色等信息
    @GET("app/b/user/valuation/fillInValuation")
    Observable<Result<CarConfigsBean>> fillInValuation();

    // 车辆额度查询--获取城市列表
    @POST("app/b/user/valuation/getCityList")
    Observable<Result<List<CarCityItemBean>>> getCityList(@Body RequestBody body);

    // 车辆额度查询--根据车架号获取品牌信息
    @POST("app/b/user/valuation/getCarBaseInfoByCarCode")
    Observable<Result<CarByCodeBean>> getByCarCode(@Body RequestBody body);

    // 车辆额度查询--获取所有品牌信息
    @GET("app/b/user/valuation/getAllBrandList")
    Observable<Result<List<CarBrandBean>>> getAllBrandList();

    // 车辆额度查询--获取品牌下的车系
    @POST("app/b/user/valuation/getAllCarSeriesFromBrand")
    Observable<Result<List<CarSeriesBean>>> getAllCarSeriesFromBrand(@Body RequestBody body);

    // 车辆额度查询--获取车系下的所有车型
    @POST("app/b/user/valuation/getAllCarModelFromSeries")
    Observable<Result<List<CarModelBean>>> getAllCarModel(@Body RequestBody body);

    // 车辆额度查询--估价
    @POST("app/b/user/valuation/getValuationByChe300")
    Observable<Result<Double>> assess(@Body RequestBody body);

    // 还款信息列表接口
    @POST("app/b/loan/loanList")
    Observable<Result<RepayList>> loanList(@Body RequestBody body);

    // 还款-费用清单
    @POST("app/b/loan/feeList")
    Observable<Result<CostBean>> feeList(@Body RequestBody body);

    // 还款列表详情接口
    @POST("app/b/loan/loanDetail")
    Observable<Result<RePayDetailBean>> loanDetail(@Body RequestBody body);

    // 还款--还款界面信息
    @POST("app/b/loan/toRepayment")
    Observable<Result<ToRepayBean>> toRepayment(@Body RequestBody body);

    // 还款--还款
    @POST("app/b/loan/onLineRepayment")
    Observable<Result<String>> onLineRepayment(@Body RequestBody body);

    // 还款--提前还清界面信息
    @POST("app/b/loan/toEarlierRepayment")
    Observable<Result<ToPayOff>> toEarlierRepayment(@Body RequestBody body);

    // 还款--提前还清界
    @POST("app/b/loan/onLineEarlierRepayment")
    Observable<Result<String>> onLineEarlierRepayment(@Body RequestBody body);

    // 还款--续贷申请信息获取
    @POST("app/b/loan/toGoOnLoanApply")
    Observable<Result<ToXuDaiApply>> toGoOnLoanApply(@Body RequestBody body);
    // 还款--续贷申请图片删除
    @POST("app/b/loan/delPic")
    Observable<Result<String>> delPic(@Body RequestBody body);
    // 续贷申请-注意事项
    @GET("app/b/loan/loanApplyAttention")
    Observable<Result<String>> loanApplyAttention();

    // 还款--续贷申请提交
    @POST("app/b/loan/goOnLoanApply")
    Observable<Result<String>> goOnLoanApply(@Body RequestBody body);

    // 还款--续贷信息获取
    @POST("app/b/loan/toGoOnLoan")
    Observable<Result<ToXuDaiApply>> toGoOnLoan(@Body RequestBody body);

    // 还款--续贷
    @POST("app/b/loan/goOnLoan")
    Observable<Result<String>> GoOnLoan(@Body RequestBody body);

    // 获取个人信息
    @POST("app/b/user/borrowerInformation")
    Observable<Result<UserBaseInfo>> getBaseInfo(@Body RequestBody body);

    //获取行业列表一级
    @GET("app/b/user/getFirstIndustryList")
    Observable<Result<List<IndustryBean>>> getFirstIndustryList();

    // 获取行业列表二级
    @POST("app/b/user/getOtherIndustryList")
    Observable<Result<List<IndustryBean>>> getOtherIndustryList(@Body RequestBody body);

    // 保存个人信息
    @POST("app/b/user/savaBorrowerInformation")
    Observable<Result<String>> saveBaseInfo(@Body RequestBody body);

    @GET("app/b/user/getNativePlace")
    Observable<Result<List<NativeBean>>> getNativePlace();

    // 充值接口(存管新)
    @POST("user/app/inParameter")
    Observable<Result<String>> recharge(@Body RequestBody body);

    //提现接口（新网）
    @POST("user/app/handlingCharge")
    Observable<Result<String>> withdrawals(@Body RequestBody body);

    //缴纳违约金（新网）
    @POST("app/b/user/payPenaltyAmount")
    Observable<Result<PenaltyBean>> payPenaltyAmount(@Body RequestBody body);

    //个人换绑卡
    @POST("app/b/user/changeBankCard")
    Observable<Result<String>> changeBankCard(@Body RequestBody body);

    //4.修改密码验证原密码接口
    @POST("user/app/b/index/updatePasswordFirstStep")
    Observable<Result<String>> validatePass(@Body RequestBody body);

    //4.修改密码验证原密码接口
    @POST("user/app/b/index/updatePasswordSecondStep")
    Observable<Result<String>> mofityPass(@Body RequestBody body);

    //我要借款
    @POST("app/b/loan/loanIntent")
    Observable<Result<WanLoanBean>> loanIntent(@Body RequestBody body);

    //获取版本号
    @POST("user/app/b/version/getVersion")
    Observable<Result<NewUpVersionBean>> getVersion(@Body RequestBody body);

    //修改身份证照片
    @Multipart
    @POST("app/b/user/uploadIdentity")
    Observable<Result<UpLoadCard>> imageUploadCard(@Part() MultipartBody.Part img, @Part() MultipartBody.Part userId, @Part() MultipartBody.Part type, @Part() MultipartBody.Part token, @Part() MultipartBody.Part sign);

    //上传单张图片
    @Multipart
    @POST("app/b/loan/picUpload")
    Observable<Result<UpLoadBean>> imageUpload(@Part() MultipartBody.Part img, @Part() MultipartBody.Part userId, @Part() MultipartBody.Part repayPlanId, @Part() MultipartBody.Part imgId, @Part() MultipartBody.Part token, @Part() MultipartBody.Part sign);

    //修改头像接口
    @Multipart
    @POST("user/app/b/info/changePortrait")
    Observable<Result<String>> headUpload(@Part() MultipartBody.Part img, @Part() MultipartBody.Part userId, @Part() MultipartBody.Part token, @Part() MultipartBody.Part sign);

}
